import { combineReducers } from 'redux'
function setCurrentUser(state = null, action) {
    switch (action.type) {
        case 'setCurrUser':
            return action.data
        default:
            return state
    }
}
function setCurrentChild(state = null, action) {
    switch (action.type) {
        case 'setCurrChild':
            return action.data
        default:
            return state
    }
}
function setChildrens(state = null, action) {
    switch (action.type) {
        case 'setChildrens':
            return action.data
        default:
            return state
    }
}
function setCacheData(state = 0, action) {
    switch (action.type) {
        case 'setCache':
            return action.data
        default:
            return state
    }
}

export const finalReducer = combineReducers({
    setCurrentUser, setCacheData, setCurrentChild,setChildrens
})